package cn.iocoder.yudao.module.crossborder.order.controller.admin.ordermain.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 跨境电商订单主新增/修改 Request VO")
@Data
public class OrderMainSaveReqVO {

    @Schema(description = "订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "18136")
    private Long id;

    @Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "订单号不能为空")
    private String orderNo;

    @Schema(description = "平台订单ID", example = "2386")
    private String platformOrderId;

    @Schema(description = "平台订单号")
    private String platformOrderNo;

    @Schema(description = "平台编号", example = "12746")
    private Long platformId;

    @Schema(description = "店铺编号", example = "3530")
    private Long storeId;

    @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23503")
    @NotNull(message = "客户编号不能为空")
    private Long customerId;

    @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "客户编号不能为空")
    private String customerNo;

    @Schema(description = "订单类型（1普通订单 2预售订单 3团购订单 4批发订单 5换货订单）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "订单类型（1普通订单 2预售订单 3团购订单 4批发订单 5换货订单）不能为空")
    private Integer orderType;

    @Schema(description = "订单来源")
    private String orderSource;

    @Schema(description = "销售渠道")
    private String salesChannel;

    @Schema(description = "订单状态（10待确认 20待支付 30已支付 40备货中 50已发货 60已送达 70已完成 80已取消 90已退款）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "订单状态（10待确认 20待支付 30已支付 40备货中 50已发货 60已送达 70已完成 80已取消 90已退款）不能为空")
    private Integer orderStatus;

    @Schema(description = "支付状态（10未支付 20部分支付 30已支付 40支付失败 50已退款 60部分退款）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "支付状态（10未支付 20部分支付 30已支付 40支付失败 50已退款 60部分退款）不能为空")
    private Integer paymentStatus;

    @Schema(description = "履约状态（10待处理 20备货中 30已分配 40拣货中 50已拣货 60已打包 70已发货 80运输中 90已送达）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "履约状态（10待处理 20备货中 30已分配 40拣货中 50已拣货 60已打包 70已发货 80运输中 90已送达）不能为空")
    private Integer fulfillmentStatus;

    @Schema(description = "订单货币", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "订单货币不能为空")
    private String currencyCode;

    @Schema(description = "汇率", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "汇率不能为空")
    private BigDecimal exchangeRate;

    @Schema(description = "基础货币")
    private String baseCurrency;

    @Schema(description = "商品种类数", requiredMode = Schema.RequiredMode.REQUIRED, example = "18639")
    @NotNull(message = "商品种类数不能为空")
    private Integer itemCount;

    @Schema(description = "商品总数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "商品总数量不能为空")
    private BigDecimal totalQuantity;

    @Schema(description = "商品小计金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "商品小计金额不能为空")
    private BigDecimal subtotalAmount;

    @Schema(description = "运费", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "运费不能为空")
    private BigDecimal shippingAmount;

    @Schema(description = "税费", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "税费不能为空")
    private BigDecimal taxAmount;

    @Schema(description = "关税", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "关税不能为空")
    private BigDecimal dutyAmount;

    @Schema(description = "保险费", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "保险费不能为空")
    private BigDecimal insuranceAmount;

    @Schema(description = "手续费", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "手续费不能为空")
    private BigDecimal handlingFee;

    @Schema(description = "折扣金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "折扣金额不能为空")
    private BigDecimal discountAmount;

    @Schema(description = "优惠券金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "优惠券金额不能为空")
    private BigDecimal couponAmount;

    @Schema(description = "积分抵扣金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "积分抵扣金额不能为空")
    private BigDecimal pointsAmount;

    @Schema(description = "调整金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "调整金额不能为空")
    private BigDecimal adjustmentAmount;

    @Schema(description = "订单总金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "订单总金额不能为空")
    private BigDecimal totalAmount;

    @Schema(description = "已支付金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "已支付金额不能为空")
    private BigDecimal paidAmount;

    @Schema(description = "退款金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "退款金额不能为空")
    private BigDecimal refundAmount;

    @Schema(description = "获得积分", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "获得积分不能为空")
    private Integer pointsEarned;

    @Schema(description = "使用积分", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "使用积分不能为空")
    private Integer pointsUsed;

    @Schema(description = "下单时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "下单时间不能为空")
    private LocalDateTime orderTime;

    @Schema(description = "确认时间")
    private LocalDateTime confirmTime;

    @Schema(description = "支付时间")
    private LocalDateTime paymentTime;

    @Schema(description = "发货时间")
    private LocalDateTime shipTime;

    @Schema(description = "送达时间")
    private LocalDateTime deliveryTime;

    @Schema(description = "完成时间")
    private LocalDateTime completeTime;

    @Schema(description = "取消时间")
    private LocalDateTime cancelTime;

    @Schema(description = "取消原因", example = "不喜欢")
    private String cancelReason;

    @Schema(description = "预计送达日期")
    private LocalDate expectedDeliveryDate;

    @Schema(description = "发货截止时间")
    private LocalDateTime deliveryDeadline;

    @Schema(description = "自动确认天数")
    private Integer autoConfirmDays;

    @Schema(description = "买家留言")
    private String buyerMessage;

    @Schema(description = "卖家备注")
    private String sellerMessage;

    @Schema(description = "内部备注")
    private String internalNotes;

    @Schema(description = "风险评分")
    private BigDecimal riskScore;

    @Schema(description = "风险等级（1低 2中 3高）")
    private Integer riskLevel;

    @Schema(description = "反欺诈检查状态（0未检查 1检查中 2通过 3拒绝）", example = "2")
    private Integer fraudCheckStatus;

    @Schema(description = "是否紧急订单", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否紧急订单不能为空")
    private Boolean isUrgent;

    @Schema(description = "是否礼品订单", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否礼品订单不能为空")
    private Boolean isGift;

    @Schema(description = "礼品留言")
    private String giftMessage;

    @Schema(description = "是否代发货", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否代发货不能为空")
    private Boolean isDropshipping;

    @Schema(description = "订单标签，逗号分隔")
    private String tags;

}